
Stepper motor moves 1.8 degrees per step, or 200 steps per rev.

****************************************************************************************************************************
Lead screw with 5 revs per inch.
****************************************************************************************************************************
200 steps/rev * 5 rev/inch = 1000 steps/inch
1 in / 1000 steps/inch = 0.001 in/step
A microstep = 0.001 / 16 = 0.0000625.

****************************************************************************************************************************
****************************************************************************************************************************
Chip app Counts_Per_Inch
****************************************************************************************************************************
****************************************************************************************************************************
Motor has 200 steps per rev, but with microstepping a step is divided by 16 so total counts for one rev is 200 * 16 = 3200

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
For 5 turns per inch lead screw, or 0.200 in/rev
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Counts per inch = 3200 counts/rev * 5 rev/inch = 16,000


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
For 5mm per rev ball screw
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5mm = 0.1968503937007874 in
1 rev / 0.1968503937007874 in = 5.08 rev/ inch
Counts per inch = 3200 counts/rev * 5.08 rev/ inch = 16,256 counts/rev


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
For 10mm per rev ball screw
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1mm = 0.3937007874015748 in
1 rev / 0.3937007874015748 in = 2.54 rev/ inch
Counts per inch = 3200 counts/rev * 2.54 rev/ inch = 8,128 counts/rev


****************************************************************************************************************************
****************************************************************************************************************************
KFlop Inv_Dist_Per_Cycle
****************************************************************************************************************************
****************************************************************************************************************************

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
For 5 turns per inch lead screw
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

200 steps/rev * 5 rev/inch = 1000 steps/inch

1 in / 1000 steps/inch = 0.001 in/step
One cycle = 4 steps, or 0.25 cycles/step

Inv_Dist_Per_Cycle = 0.25 cycles/step * 1000 step/in = 250 cycles/in

Or as in the Dynamotion documents
One cycle = 4 steps, or 0.004 in/cycle (0.001 in/step * 4 steps/cycles)
Inv_Dist_Per_Cycle = 1 cycle / 0.004 in/cycle = 250 cycles/inch


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
For 5mm lead ball screw
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5mm = 0.1968503937007874 in
5mm / rev = 0.1968503937007874 in / rev

1 rev / 0.1968503937007874 in = 5.08 revs / inch

200 steps / rev * 5.08 revs / inch = 1016 steps/in

One cycle = 4 steps, or 0.25 cycles/step

Inv_Dist_Per_Cycle = 0.25 cycles/step * 1016 step/in = 254 cycles/inch


****************************************************************************************************************************
****************************************************************************************************************************
Chip app definitions
****************************************************************************************************************************
****************************************************************************************************************************
 Public X_Counts_Per_Inch As Double = 16000  '5 rev/inch lead screw, 3200 counts/rev * 5 rev/in 16,000 counts/in
'Public X_Counts_Per_Inch As Double = 8,128  '10mm ball screw, 3200 counts/rev * 2.54 rev/ inch = 8,128 counts/rev
Public Y_Counts_Per_Inch As Double = 16000   '5 rev/inch lead screw, 3200 counts/rev * 5 rev/in 16,000 counts/in
'Public Y_Counts_Per_Inch As Double = 8,128  '10mm ball screw, 3200 counts/rev * 2.54 rev/ inch = 8,128 counts/rev
Public Z_Counts_Per_Inch As Double = 16256   ' 3200 counts/rev * 5.08 rev/ inch = 16,256 counts/rev



****************************************************************************************************************************
****************************************************************************************************************************
KFlop C program definitions
****************************************************************************************************************************
****************************************************************************************************************************

